{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "93103597-996b-46ec-9804-63164b775896",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "import yaml\n",
    "\n",
    "from mosaic_widget import MosaicWidget"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "ed9edb9e-4ed2-4e5e-b44c-81a2c7a73af4",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "# Optional: enable logging in Mosaic widget\n",
    "import logging\n",
    "\n",
    "logging.basicConfig(level=logging.INFO)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f6b72efe-e92d-4f72-b2bc-a7fd814cc68d",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "weather = pd.read_csv(\"../../data/seattle-weather.csv\", parse_dates=[\"date\"])\n",
    "\n",
    "# Load weather spec, remove data key to ensure load from Pandas\n",
    "with open(\"../../specs/yaml/weather.yaml\") as f:\n",
    "    spec = yaml.safe_load(f)\n",
    "    spec.pop(\"data\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "4da7f0fd-ec48-4ca9-b927-cbf9b0a5d8b8",
   "metadata": {
    "tags": []
   },
   "outputs": [],
   "source": [
    "MosaicWidget(spec, data={\"weather\": weather})"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "mosaic",
   "language": "python",
   "name": "mosaic"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
